package com.gxa.learning.core.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 问卷模板实体类
 * @Author ChenJ
 * @date 2021/12/02 14:16
 **/
@AllArgsConstructor
@NoArgsConstructor
@Data
@Table(name = "tb_questionnaire_template")
@ApiModel
public class QueTemplate implements Serializable {

    /**
     * 问卷模板编号
     */
    @Id
    @Column(name = "questionnaire_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(name = "id",value = "id",dataType = "Long",example = "摹本编号")
    private Long id;

    /**
     * 问卷标题
     */
    @Column(name = "questionnaire_title",unique = true)
    @ApiModelProperty(name = "title",value = "title",dataType = "String",example = "问卷标题")
    private String title;

    /**
     * 问卷说明
     */
    @Column(name = "questionnaire_explain",unique = true)
    @ApiModelProperty(name = "explain",value = "explain",dataType = "String",example = "问卷说明")
    private String explain;

    /**
     * 问卷名称
     */
    @Column(name = "questionnaire_name",unique = true)
    @ApiModelProperty(name = "name",value = "name",dataType = "String",example = "问卷名称")
    private String name;

    /**
     * 部门
     */
    @Column(name = "department_part",unique = true)
    @ApiModelProperty(name = "part",value = "part",dataType = "String",example = "部门")
    private String part;

    /**
     * 状态
     */
    @Column(name = "questionnaire_status",unique = true)
    @ApiModelProperty(name = "status",value = "status",dataType = "String",example = "状态")
    private String status;

    /**
     * 上传人
     */
    @Column(name = "questionnaire_user",unique = true)
    @ApiModelProperty(name = "user",value = "user",dataType = "String",example = "上传人")
    private String user;

    /**
     * 上传时间
     */
    @Column(name = "questionnaire_time",unique = true)
    @ApiModelProperty(name = "time",value = "time",dataType = "Date",example = "上传时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date time;

}
